from django.shortcuts import render
from rest_framework.views import APIView
from django.http import JsonResponse
from authention import authentication


class UserInfoViewSet(APIView):
    authentication_classes = [authentication.IsAuthenticated,]
    permission_classes = (authentication.IsOwnerOrReadOnly,)

    def __init__(self):
        super(UserInfoViewSet, self).__init__()

    def get(self, request, *args, **kwargs):
        result = {
            'status': True,
            'data': 'response data'
        }
        return JsonResponse(result, status=200)

    def post(self, request, *args, **kwargs):
        result = {
            'status': True,
            'data': 'response data'
        }
        return JsonResponse(result, status=200)
